<!--
 * @Description: tabbar第4页 求职-我的 or 招聘-我的
 * @Author: rcc
 * @Date: 2024-08-08 19:03:41
 * @FilePath: /rc-recruitment/pages/tab-page/tab-4/tab-4.vue
-->

<template>
	<!--	求职-我的-->
	<JobMine v-if="showJob" />
	<!--	招聘-我的-->
	<HiringMine v-else />
</template>

<script lang="ts" setup>
import { ref } from "vue";
import useTabbar from "@/hooks/use-tabbar.ts";
import { useUserStore } from "@/stores/user.ts";

import JobMine from "@/pages/tab-page/job-mine/job-mine.vue";
import HiringMine from "@/pages/tab-page/hiring-mine/hiring-mine.vue";
import { onLoad, onShow, onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
onShareAppMessage(() => {
	return {
		path: `/pages/tab-page/tab-4/tab-4`
	}
})
onShareTimeline(() => {
	return {
		path: `/pages/tab-page/tab-4/tab-4`
	}
})
const { initTabBar } = useTabbar();
const { isJob } = useUserStore();
const showJob = ref(isJob);
const loading = ref(false);
onShow(() => {
	loading.value = false;
	const { isJob } = useUserStore();
	showJob.value = isJob;
	setTimeout(() => {
		loading.value = true;
	}, 100);
});
onLoad(() => {
	initTabBar();
});
</script>

<style lang="scss" scoped></style>
